package com.xframe.domain.e3sp.basedata;

import com.xframe.domain.BaseModel;
import com.xframe.domain.e3sp.maindata.SparePartBaseView;
import com.xframe.xdal.core.annotation.*;
import com.xframe.xdal.core.constant.AutoFillType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @Description: 替代件试图
 * @ClassName: com.xframe.domain.e3sp.basedata.PartReplaceView
 * @Author: xufeng
 * @CreateTime: 2024/01/02
 **/
@Data
@Accessors(chain=true)
@XTable(value = "v_t02_replace", label = "替代件试图")
@XBelongsTo(typeName = "com.xframe.domain.e3sp.maindata.SparePartBaseView",foreignKey = "sparePartId", targetKey = "sparePartId",as = "refSparePartBaseView")
public class PartReplaceView extends BaseModel {

    /**
     * 替代件明细ID
     */
    @AutoFill(AutoFillType.Snowflake)
    @XColumn(name = "replace_d_id", primaryKeyFlag = true,desc = "替代件明细ID")
    private Long replaceDId;
    /**
     * 替代件ID
     */
    @AutoFill(AutoFillType.Snowflake)
    @XColumn(name = "replace_id",desc = "替代件ID")
    private Long replaceId;
    /**
     * 备件编码
     */
    @XColumn(name = "spare_part_no",desc = "备件编码")
    private String sparePartNo;

    /**
     * 替换连编码
     */
    @XColumn(name = "switch_code_code",desc = "替换连编码")
    private String switchCode;

    /**
     * 顺序号
     */
    @XColumn(name = "order_no",desc = "顺序号")
    private String orderNo;


    /**
     * 备件ID
     */
    @XColumn(name = "spare_part_id",desc = "备件ID")
    private Long sparePartId;

    /**
     * 备件名称
     */
    @XColumn(name = "spare_part_name",desc = "备件名称")
    private String sparePartName;

    /**
     * 互换码名称
     */
    @XColumn(name = "switch_name",desc = "互换码名称")
    private String switchName;

    /**
     * 替代链号
     */
    @XColumn(name = "replace_code",desc = "替代链号",length = 200)
    private String replaceCode;

    /**
     * 数量
     */
    @XColumn(name = "qty",desc = "数量",nullFlag = true)
    private Integer qty;

    /**
     * 备注
     */
    @XColumn(name = "remark",desc = "备注",length = 500,nullFlag = true)
    private String remark;

    /**
     * 成套件
     */
    @XColumn(name = "sup_part_code",desc = "成套件")
    private Long supPartCode;

    /**
     * 修改起始时间
     */
    @XColumn(name = "start_update_time",desc = "修改起始时间",nullFlag = true)
    private Date startUpdateTime;

    /**
     * 修改终止时间
     */
    @XColumn(name = "end_update_time",desc = "修改终止时间",nullFlag = true)
    private Date endUpdateTime;


    /**
     * 备件  refSparePartBaseView.procureSwitch  refSparePartBaseView.salesSwitch
     */
    private SparePartBaseView refSparePartBaseView;
}
